package com.caipos.actor.ruleChain;

import com.caipos.actor.common.actors.KbActorCtx;
import com.caipos.actor.common.actors.KbActorRef;
import com.caipos.actor.common.data.id.TenantId;
import com.caipos.actor.common.data.rule.RuleNode;
import lombok.Data;

@Data
public final class RuleNodeCtx {
    private final TenantId tenantId;
    private final KbActorRef chainActor;
    private final KbActorRef selfActor;
    private RuleNode self;

    RuleNodeCtx(TenantId tenantId, KbActorCtx selfActor, RuleNode self) {
        this(tenantId, selfActor.getParentRef(), selfActor, self);
    }

    RuleNodeCtx(TenantId tenantId, KbActorRef chainActor, KbActorRef selfActor, RuleNode self) {
        this.tenantId = tenantId;
        this.chainActor = chainActor;
        this.selfActor = selfActor;
        this.self = self;
    }
}
